/**
 * 
 */
package sailing.utils;

import sailing.utils.PD.PromptTask;

/**
 * @author kevin
 * 
 */
public abstract class STask {

	private PromptTask promptTask;

	private boolean hasAfterMsg = false;
	private String afterMsg;

	public abstract void run();

	public void setCaller(PromptTask promptTask) {
		this.promptTask = promptTask;
	}

	public void setMsg(String msg) {
		promptTask.updateMsg(msg);
	}

	protected void afterMsg(String msg) {
		this.hasAfterMsg = true;
		this.afterMsg = msg;
	}

	public Object getAfterMsg() {
		return this.afterMsg;
	}

	public boolean hasAfterMessage() {
		return this.hasAfterMsg;
	}

}
